import request from '@/utils/request'

// 查询商户列表
export function listInfo(query) {
  return request({
    url: '/operator/mch/list',
    method: 'get',
    params: query
  })
}

export function listMch() {
  return request({
    url: '/operator/mch/allList',
    method: 'get'
  })
}

// 查询商户详细
export function getInfo(id) {
  return request({
    url: '/operator/mch/' + id,
    method: 'get'
  })
}

// 新增商户
export function addInfo(data) {
  return request({
    url: '/operator/mch',
    method: 'post',
    data: data
  })
}

// 修改商户
export function updateInfo(data) {
  return request({
    url: '/operator/mch',
    method: 'put',
    data: data
  })
}

// 删除商户
export function delInfo(id) {
  return request({
    url: '/operator/mch/' + id,
    method: 'delete'
  })
}

// 导出商户
export function exportInfo(query) {
  return request({
    url: '/operator/mch/export',
    method: 'get',
    params: query
  })
}
